import 'package:flutter/material.dart';

var textStyle = TextStyle(
  fontSize: 20,
  fontWeight: FontWeight.w600,
  color: Colors.white,
);

class Header extends StatelessWidget {
  const Header({ Key? key }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 110.0,
      padding: EdgeInsets.all(16.0),
      decoration: BoxDecoration(
        color: Theme.of(context).primaryColor
      ),
      child: Padding(
        padding: const EdgeInsets.only(left: 8.0),
        child: Row(
          children: [
            Container(
              width: 100.0,
              height: 100.0,
              child: CircleAvatar(
                backgroundImage: NetworkImage('https://tva1.sinaimg.cn/large/008i3skNgy1gsuh24kjbnj30do0duaad.jpg'),
              ),
            ),
            GestureDetector(
              onTap: (){
                Navigator.of(context).pushNamed('register');
              },
              child: Text('注册', style: textStyle,),
            ),
            Text('/', style: textStyle,),
            GestureDetector(
              onTap: (){
                Navigator.of(context).pushNamed('login');
              },
              child: Text('登录', style: textStyle,),
            )
          ],
        ),
      ),
    );
  }
}